
<%@ page contentType="text/html; charset=utf-8" 
%><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" 
%><%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" 
%><%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" 
%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>jqgrid.jsp</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<%@ include file="/jsp/common/include.base.jsp" %>
<jsp:include page="/jsp/common/include.commoncode.jsp" flush="false"><jsp:param name="gp" value="1,2"/></jsp:include>
<%@ include file="/jsp/common/include.jqgrid.jsp" %>
<%@ include file="/jsp/common/include.form.jsp" %>
<script type="text/javascript">

var _openPopupData = {};

function _openPopup(url, name, args, callback) {
	_openPopupData[name] = {args:args, callback:callback};
	
	var popup = window.open("popup.jsp", name, "width=500,height=500,top=10,left=10");
	popup.focus();
}

var myCallback = function(data) {
	$("body").append("<span>" + data + "</span>"); 
}

function myOpenPopup() {
	_openPopup("popup.jsp", "popup_1", {searchVal:"우리나라"}, myCallback);
}
	
</script>
</head>
<body>
<button type="button" id="btnAdd" onclick="myOpenPopup()">open popup</button>
</div>
</body>
</html>